home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / ibm / faspc1p2.arc / README.TXT < prev   
Text File  |  1990-07-15  |  12KB  |  250 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                             Motorola's Freeware Assemblers
  7.                                     "Version 1.2"
  8.  
  9.  
  10.                  Welcome to "Version 1.2" of Motorola's Freeware
  11.           Assemblers.  I've put the version number in quotes because I'm
  12.           not certain that anyone's been keeping track...  I consider the
  13.           correction and enhancements made by Bruce Olney as Version 1.1,
  14.           so I'm calling my contribution "Version 1.2".  My contribution
  15.           consists of activation of the END directive, corrected forward
  16.           reference handling, allowance of long file or path names (MAC
  17.           users, this may help you), improved handling of multiple source
  18.           files, improved error detection and reporting (both input code
  19.           and assembler operation), allowance of a little more leeway in
  20.           operand syntax, and some miscellaneous changes.
  21.                  This file contains a more detailed listing of the changes
  22.           mentioned above, as well as some corrections for another file
  23.           you'll want:  ASREF.MAN.  ASREF.MAN is the manual for the
  24.           freeware assemblers.  Look for ASREF.ARC, which can be "de-
  25.           archived" with PKXARC to yield ASREF.MAN.  The archive this file
  26.           came from contains the assemblers compiled and ready to run for
  27.           the IBM PC and compatibles (compiled with QuickC 2.0, compact
  28.           memory model).  If you need the source code for the assemblers,
  29.           look for FASRC1P2.ARC.  Hopefully, a generous MAC user will
  30.           upload an archive of the assemblers compiled for the MAC.  I'll
  31.           take the liberty of suggesting the name FASMA1P2.ARC.  The file
  32.           ASEMBLER.DOC (included in the archive you got this file from)
  33.           contains a brief rundown on the freeware assemblers for those
  34.           acquainted with Motorola's other development products.  I have
  35.           edited ASEMBLER.DOC only a little; it does not include much of
  36.           the information presented here.
  37.                  I have used good 68HCx05 code to test AS5, so it should be
  38.           nearly bug free.  Since most of the code is common to all the
  39.           assemblers, the others should be in reasonably good shape but
  40.           are untested.  If you discover bugs, please report them on
  41.           Motorola's Freeware BBS.  If you wish to contact me about these
  42.           assemblers, I may be reached (in order of preference) on
  43.  
  44.                  Motorola's Freeware BBS       (512) 891-3733
  45.                  the JDR Microdevices BBS      (408) 559-0253
  46.                  or the Radio-Electronics BBS  (516) 293-2283
  47.  
  48.                  Thank you to all who have worked on these assemblers
  49.           before me, and best wishes to all who use them.  Just in case any
  50.           copyright worries should pop up, I hereby release to the public
  51.           domain this document and all of the changes and I have written
  52.           into these assemblers.
  53.  
  54.                                                  Greg Thoman
  55.                                                  1990 July 15
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.           THE END DIRECTIVE
  73.  
  74.                  Past versions of the assemblers ignored the END directive.
  75.           Now, END terminates assembly of the current source file without
  76.           affecting assembly of subsequent source files and lets you
  77.           specify your program's entry point.  The syntax is:
  78.  
  79.           [label]   END [expression]  [;comment]
  80.  
  81.           where the brackets indicate optional items and are NOT included
  82.           in your code.  The label follows the same rules as all other
  83.           labels:  it must start in the first column, must begin with a
  84.           letter, an underscore, or a period, and may contain letters,
  85.           digits, underscores, periods, and dollar signs.  The expression,
  86.           if used, sets your program's entry point.  Thus, it will usually
  87.           be a program label; however, it can be any valid expression that
  88.           evaluates to the address you want.
  89.                  Comments following the END directive should start with a
  90.           semicolon to prevent confusion in case there's no expression to
  91.           evaluate.  The expression evaluator will probably find a comment
  92.           distasteful.
  93.                  You may use the END directive at the end of each source
  94.           file in a group, and may use it more than once in the same file
  95.           (the first END will stop assembly of that file, so the assembler
  96.           will never see any later ENDs).  If the assembler encounters END
  97.           with an expression more than once you'll get a warning if the
  98.           expressions evaluate to the same address.  If the expressions
  99.           evaluate to different addresses, you'll get an error.
  100.  
  101.  
  102.           FORWARD REFERENCE HANDLING
  103.  
  104.                  The assemblers were deleting the forward reference file
  105.           before attempting to use it.  "Version 1.2" deletes the forward
  106.           reference file after assembly is finished.  This may reduce the
  107.           number of "phasing errors" you run into, but they'll still be
  108.           around.
  109.  
  110.  
  111.           LONG FILE OR PATH NAMES
  112.  
  113.                  The assemblers now attempt to use your C compiler's
  114.           definition of FILENAME_MAX to set the filename buffer size.
  115.           I believe this is an ANSI item and may not be defined on non-ANSI
  116.           compilers.  If FILENAME_MAX is not defined by your compiler, the
  117.           assemblers will use their maximum buffer size (512 bytes in
  118.           "Version 1.2").  Thus, you should be able to use full path names
  119.           and work among subdirectories.
  120.                  This may help MAC users who have had to run the assemblers
  121.           from the root "folder" of a floppy drive.  Try it out!
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.           MULTIPLE SOURCE FILES
  139.  
  140.                  The assembler now outputs the message "  Assembling <file
  141.           name>", where <file name> is the name of the file about to be
  142.           assembled, as it begins assembly of each file in pass 2.  If you
  143.           are having the assembler create a listing file, these messages
  144.           will break the listing file up so you can see which source file
  145.           is which.
  146.                  Warnings and error messages now report the line number
  147.           within the source file where a problem was found instead of the
  148.           cumulative line number.  This makes error correction easier.  The
  149.           listing, cross reference, and symbol table use the cumulative
  150.           line number.
  151.  
  152.  
  153.           ERROR DETECTION AND REPORTING
  154.  
  155.                  Error and warning messages always give the name of the
  156.           source file where a problem was found.
  157.                  Some error messages are now less cryptic, and error
  158.           messages always start with "Error".
  159.                  Use of NUL as a character constant now generates an error
  160.           message.
  161.                  The assemblers now count the number of warnings issued and
  162.           output it after assembly.
  163.                  Warnings are output on both passes.  If you're generating
  164.           a listing, it will start with a list of warning messages and each
  165.           suspect line will be accompanied by its warning message.
  166.                  The assemblers now warn of over-length labels and error on
  167.           over-length mnemonics or directives.
  168.                  Any unrecognized option on the command line is a fatal
  169.           error, and the assembler will output a list of allowed options.
  170.                  All memory allocation operations are checked for failure.
  171.                  All file operations are checked for failure.
  172.  
  173.  
  174.           OPERAND SYNTAX
  175.  
  176.                  Character constants are now allowed to have a closing
  177.           single quote.  Thus, 'a and 'a' are the same to the assemblers.
  178.                  The OPT directive now allows multiple options, as
  179.           described in ASREF.MAN.
  180.                  The assemblers now allow comma-delimited lists to contain
  181.           whitespace after each comma.  Thus, "OPT NOL,C" is the same as
  182.           "OPT NOL, C".  This also works for data initialization and MC6811
  183.           register lists.  Note that as always, whitespace is NOT allowed
  184.           in indexed addressing.  "LDA DOG,X" is legal, while "LDA DOG, X"
  185.           is not.
  186.                  Except for AS4 and certain 6809 instructions, the
  187.           assemblers interpret an operand consisting only of an index
  188.           register as a request for zero-offset indexed addressing.  Thus,
  189.           "LDA X", "LDA ,X", and "LDA 0,X" all mean to load register A with
  190.           the value whose address is in the X register.  On the 6804 the
  191.           registers are memory locations, so the comma is required to
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.           prevent confusion.  On the 6809, pushes and pulls interpret a
  205.           register alone as that register, not indexed addressing.
  206.                  Arguments to the OPT directive may now be upper case,
  207.           lower case, or mixed case.
  208.                  The semicolon may be used to start a comment almost
  209.           anywhere on a line.  Unless the semicolon is the first character
  210.           on the line at least one whitespace character should precede it.
  211.           The semicolon does NOT act as a comment starter if it can be
  212.           interpreted as an argument to an FCC directive or if it is
  213.           immediately preceded by a single quote ( '; is a character
  214.           constant, not the start of a comment).
  215.  
  216.  
  217.           MISCELLANEOUS
  218.  
  219.                  Line continuation with the backslash character has
  220.           apparently never existed in these assemblers.  I have not added
  221.           it.
  222.                  When the assemblers truncate listing of a long data group,
  223.           they add a note to the listing to tell you.
  224.                  The buffer size in "Version 1.2" is 512 bytes.  This will
  225.           allow lines up to 510 characters (last two bytes are taken up by
  226.           the line's carriage return and an end-of-string marker).  The
  227.           assemblers will choke on longer lines.
  228.                  When the assemblers encounter "OPT NOC" while listing,
  229.           they output the cumulative cycle count to that point.  The
  230.           cumulative cycle count is also output after the last source line
  231.           if cycle counting is still enabled.
  232.                  AS9 allows TFR from a 16 bit register to an 8 bit
  233.           register, as described in ASREF.MAN.
  234.                  If you want to use the assemblers on an 8 bit machine you
  235.           ought to change all of the data items declared as "int" to
  236.           "short" so that they'll still be long enough for various overflow
  237.           checks to work (unfortunately, this will slow processing).  If
  238.           you use a 32 bit machine and compiler or change some "int" items
  239.           to "long", you'll get a warning if the entry point specified with
  240.           END overflows 16 bits.
  241.  
  242.  
  243.           SOME ASREF.MAN CORRECTIONS
  244.                  Page 6:   Parentheses are NOT allowed in expressions.
  245.                  Page 10:  The "no listing" option is nol, not no, and is
  246.           the default.
  247.                  Page 14:  The contc option continues a previously stopped
  248.           cycle count and is not listed in ASREF.MAN.
  249.                  Page 20:  The predefined constants for register addresses
  250.           on the 6804 are A, X, & Y, not A, B, & C.